package lormi.meipin.entity;

import java.math.BigDecimal;
import java.util.Date;

import lormi.meipin.dto.CheckCodeDto;
import lormi.meipin.dto.RegMerChant;
import lormi.meipin.dto.RegTalent;

public class Location {
    private Integer id;

    private Integer userid;

    private Byte usertype;

    private BigDecimal longitude;

    private BigDecimal latitude;

    private Date createtime;

    private Date updatetime;
    
    public Location(CheckCodeDto checkCodeDto,Integer userId,byte userType){
    	this.userid=userId;
    	this.usertype=userType;
    	this.longitude=checkCodeDto.getLongitude();
    	this.latitude=checkCodeDto.getLatitude();
    	this.createtime=new Date();
    	this.updatetime=this.createtime;
    }
    public Location(RegMerChant regMerChant,Integer userId,byte userType){
    	this.userid=userId;
    	this.usertype=userType;
    	this.longitude=regMerChant.getLongitude();
    	this.latitude=regMerChant.getLatitude();
    	this.createtime=new Date();
    	this.updatetime=this.createtime;
    }
    public Location(RegTalent regTalent,Integer userId,byte userType){
    	this.userid=userId;
    	this.usertype=userType;
    	this.longitude=regTalent.getLongitude();
    	this.latitude=regTalent.getLatitude();
    	this.createtime=new Date();
    	this.updatetime=this.createtime;
    }

    public Location() {
		super();
	}
	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Byte getUsertype() {
        return usertype;
    }

    public void setUsertype(Byte usertype) {
        this.usertype = usertype;
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    public void setLongitude(BigDecimal longitude) {
        this.longitude = longitude;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
}